package com.treehouse.url.farmer.pornstarpagelinkgetter;

public class PornstarPageLinkGetter implements IPornstarPageLinkGetter {

	@Override
	public boolean containsNextLink(String line) {
		return (line.contains("span class=\"next_prev\"") && line
				.contains(">next</a>"));
	}

	@Override
	public String getLinkForLinkLine(String line) {
		String[] splitted = line.split("href=\"")[1].split("\">");
		String link = splitted[0];
		return link;
	}

}
